[sub {print "You invoked the \"$_[0]\" bitmap\n"}, $_]],
(qw/info questhead error/),
),
])->grid(qw/-row 0 -column 3 -sticky w/);
my $m = $menubar->Menubutton(qw/-text More -underline 0 -menuitems/ =>
[
map (
[Button => $_,
-command =>
[sub {print "You invoked \"$_[0]\"\n"}, $_]],
('An entry', 'Another entry', 'Does nothing',
'Does almost nothing', 'Make life meaningful'),
),
])->grid(qw/-row 0 -column 4 -sticky w/);
my $k = $menubar->Menubutton(qw/-text Colors -underline 1 -menuitems/ =>
[
map (
[Button => $_,
-background => $_,
-command =>
[sub {print "You invoked \"$_[0]\"\n"}, $_]],
(qw/red orange yellow green blue/),
),
])->grid(qw/-row 0 -column 5 -sticky w/);
my $details = $TOP->Label(qw/-wraplength 4i -justify left -text/ => 'This window contains a collection of menus and cascaded menus. You can post a menu from the keyboard by typing Alt+x, where "x" is the character underlined on the menu. You can then traverse among the menus using the arrow keys. When a menu is posted, you can invoke the current entry by typing space, or you can invoke any entry by typing its underlined character. If a menu entry has an accelerator, you can invoke the entry without posting the menu just by typing the accelerator.', -font => $FONT)->grid;
} # end menus
sub menus_error2 {
# Generate a background error, which may even be displayed in a window if
# using ErrorDialog.
my($msg) = @_;
$msg = "This is just a demo: no action has been defined for \"$msg\".";